﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using DauGiaApp.Models;

namespace DauGiaApp.Controllers
{
    public class HomeController : Controller
    {
        public DauGiaEntities data = new DauGiaEntities();
        public ActionResult Index()
        {
            ViewBag.Message = "Wellcome to D4 Website";
            List<SanPham>[] dsSanPham = new List<SanPham>[2];
            var dsspMoiDang = data.LayDSSPMoiDang(9);
            dsSanPham[0] = dsspMoiDang;
            var dsspDauGiaNhieu = data.LayDSSPDauGiaNhieu(9);
            dsSanPham[1] = dsspDauGiaNhieu;
            return View(dsSanPham);

        }


        public ActionResult About()
        {
            return View();
        }
        public ActionResult Alert()
        {
            return View();
        }
        [HttpPost]
        public ActionResult ThongBao(string noiDung)
        {
            return View(noiDung);
        }
    }
}
